<template>
  <div class="public-activities">
    <h2>公开活动列表</h2>
    <ul>
      <li v-for="activity in activities" :key="activity.id">
        <router-link :to="`/public-activities/${activity.id}`">{{ activity.title }}</router-link>
        <p>日期：{{ activity.date }}</p>
      </li>
    </ul>
  </div>
</template>

<script>
import activities from '../data/activities.js';

export default {
  data() {
    return {
      activities
    };
  }
};
</script>